#include "stdafx.h"
#if LIT_OGRE_SUPPORT

#include "LitCameraControllerPrivates.h"
#include "LitCameraController.h"

namespace Lit
{
	void CameraControllerPrivates::setCamera( Ogre::Camera * c ){ mCam = c; }
	void CameraControllerPrivates::setMass( Ogre::Real m ){ mMass = m; }
	void CameraControllerPrivates::setMaxSpeed( Ogre::Real speed ){ mMaxSpeed = speed; }
	void CameraControllerPrivates::setMouseSpeed( Ogre::Real speed ){ mMouseSpeed = speed; }
	void CameraControllerPrivates::setSpeedFactor( Ogre::Real factor ){ mSpeedFactor = factor; }

	CameraControllerPrivates::CameraControllerPrivates( )
		: mCam( 0 )
		, mMass( 50.0f )
		, mMaxSpeed( 10.0f )
		, mMouseSpeed( 0.10f )
		, mSpeedFactor( 1.0f )
	{
	}
	CameraControllerPrivates::CameraControllerPrivates(
		Ogre::Camera*	cam,
		Ogre::Real		mass,
		Ogre::Real		maxspeed,
		Ogre::Real		mousespeed,
		Ogre::Real		speedfactor
	)
		: mCam( cam )
		, mMass( mass )
		, mMaxSpeed( maxspeed )
		, mMouseSpeed( mousespeed )
		, mSpeedFactor( speedfactor )
	{
	}
	CameraControllerPrivates::CameraControllerPrivates( const CameraControllerPrivates& rk ){assign( rk );}
	CameraControllerPrivates::~CameraControllerPrivates(){}
		
	CameraControllerPrivates& CameraControllerPrivates::operator=( const CameraControllerPrivates& rk ){return assign( rk );}
	CameraControllerPrivates* CameraControllerPrivates::operator->( ){ return this; }
	CameraControllerPrivates& CameraControllerPrivates::operator*( ){ return *this; }

	CameraControllerPrivates& CameraControllerPrivates::assign( const CameraControllerPrivates& rk )
	{
		mCam = rk.mCam;
		mMass = rk.mMass;
		mMaxSpeed = rk.mMaxSpeed;
		mMouseSpeed = rk.mMouseSpeed;
		mSpeedFactor = rk.mSpeedFactor;
		return *this;
	}
	Ogre::Camera* CameraControllerPrivates::camera() const{ return mCam; }
	Ogre::Real CameraControllerPrivates::mass() const{ return mMass; }
	Ogre::Real CameraControllerPrivates::maxSpeed() const{ return mMaxSpeed; }
	Ogre::Real CameraControllerPrivates::mouseSpeed() const{ return mMouseSpeed; }
	Ogre::Real CameraControllerPrivates::speedFactor() const{ return mSpeedFactor; }
};

#endif